#!/bin/bash

#youtube-dl and mpv needed
#sudo apt install mpv youtube-dl

echo "Getting you a random episode of Rick and Morty..."
echo "Please wait..."

#this could be cleaned up a bunch  :)
mpv "$(wget "https://watch-series.co/search.html?keyword=rick%20and%20morty" -q -O-|grep "videoHname"|cut -d\" -f2|while read l;do wget -q -O- "https://watch-series.co$l";done|grep "fb-comments"|cut -d\" -f4|while read line;do wget -q -O- "$line/season";done|grep 'vid_info'|cut -d\" -f4|shuf|tail -n 1|while read url;do wget -q -O- "https://watch-series.co$url";done|grep -i Yourupload|cut -d\" -f6)"